<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta name="generator" content=
    "HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 13), see www.w3.org" />
    <title>
     Footprint for VCARD
    </title>
    <link rel="Stylesheet" href="di.css" type="text/css" />
    <meta http-equiv="Content-Type" content="text/html" />
  </head>
  <body>
    <address>
      Tim Berners-Lee<br />
      Date: 2013-03-13 last change: $Date: 2016/08/26 17:04:56 $<br />
      Status: documening practing in the Contact pane and the contact exporter
    </address>
    <hr />
    <h1>
      Storing VCARD data in LDP
    </h1>

    <h3>The URIs generated</h3>

    <p>Suppose an addressbook is stored using VCARD repository at a base URI $b.
    </p>
    <p>The book itself has uri  <tt>$b/book.ttl#this</tt>
    </p>
    <p>A group with cleaned-up name (spaces converted to _ and multiple __ reduced to one)
       $n   has URI   $b/Group/$n/index.ttl#this
    </p>
    <p>A person with UUID $u (was: truncated UUID) has URI   $b/Person/$u/index.ttl#this
    </p>
    <p>A mugshot person with  UUID $u has URI   $b/Person/$u/image.png
    </p>
    <h3>Group file</h3>

    <p>The group membership triple is stored in the group file but not in the person file.
      (Design choice: this is so that you can publish someone's details without revealing which groups they are in.
      This could be varied under other social contraints.)
  </p>
  When there is no known webid for a person, then in the group file we have just a simple membership triple using
  their id   $b/Person/$u/index.ttl#this.
  <pre>
    &lt;#this> vcard:hasMember &lt;../Person/$u/index.ttl#this> .
  </pre>
  When there IS a known webid $w, then that instead is used in the membership triple,
   and the internal ID for the person is equated to the webid.
  <pre>
    &lt;#this> vcard:hasMember &lt;$w> .
    &lt;$w>  =  &lt;../Person/$u/index.ttl#this> .
  </pre>
  Note that the owl:sameAs triple can be either way around, as = is commutative.
  <pre>
    &lt;#this> vcard:hasMember &lt;$w>
   &lt;../Person/$u/index.ttl#this> = &lt;$w> .
     </pre>

  <p>
  </p>
  The group file contains a declation that the group is of type vcard:Group,
  and the vcard:fn (name) of the group is in BOTH the group file and the group index.
  <p>
    </p>
    <h3>People index file</h3>

    <p>A <b>index</b> file $b/people.ttl contains copies of the vcard:fn and email triples so that
    just by loading that one can do the very common task of autocompletion user input
    for names and emails.
    </p>
    <h3>Group index file</h3>

    <p>A <b>index</b> file $b/groups.ttl contains copies of the vcard:fn of the groups so that
    just by loading that one can do the very common autocompletion user input
    for names and emails.</p>
    <p>  These two files can be found from the book itself.
    </p>
    <h3>Book file</h3>

    <pre>
    &lt;#this> vcard:nameEmailIndex  &lt;people.ttl>;
        vcard:fn "Bob's Address Book";
        vcard:groupIndex  &lt;groups.ttl>.

    </pre>
    </p>
    <h3>Card file</h3>
    <pre>
      @prefix vcard: &lt;http://www.w3.org/2006/vcard/ns#>.
      @prefix ab: &lt;http://www.w3.org/ns/pim/ab#>.  # For mac-specific stuff
      @prefix dc: &lt;http://purl.org/dc/elements/1.1/>.
      @prefix xsd: &lt;http://www.w3.org/2001/XMLSchema#>.

      &lt;#this>
       a vcard:Individual; vcard:fn "Test Person";
      vcard:hasName [vcard:given-name "Test";
      vcard:family-name "Person";
      ];
      vcard:organization-name "mit";
      vcard:url [ a vcard:webid; vcard:value &lt;http://example.org/foobar>],
      [ a vcard:FOAF; vcard:value &lt;http://example.org/test>];
      ab:ABPersonFlags 0;
      vcard:hasUID &lt;urn:uuid:82464976-2F1F-457F-9EB1-BFADC309EA8D:ABPerson>;
      dc:created "2015-11-10T18:25:06+0000"^^xsd:dateTime;
      dc:modified "2015-11-10T18:26:14+0000"^^xsd:dateTime.

    </pre>
    <hr />
    <p>
      <a href="https://www.w3.org/People/Berners-Lee/card#i">Tim BL</a>
    </p>
  </body>
</html>
